iconhelper: Show error if fail to load placeholder icon
authorRobert Ancell <robert.ancell@canonical.com>
Wed, 7 Jun 2017 23:29:09 +0000 (11:29 +1200)
committerRobert Ancell <robert.ancell@canonical.com>
Thu, 8 Jun 2017 21:24:02 +0000 (09:24 +1200)
gtk/gtkiconhelper.c

index ae62741463605d1359bbfbdf094c75cfe027a264..aab69dbd8020b86f1903471e3bc9e3ceb0020399 100644 (file)
@@ -454,13 +454,15 @@ ensure_surface_for_gicon (GtkIconHelper    *self,
 
   if (destination == NULL)
     {
+      GError *error = NULL;
       destination = gtk_icon_theme_load_icon (icon_theme,
                                               "image-missing",
                                               width,
                                               flags | GTK_ICON_LOOKUP_USE_BUILTIN | GTK_ICON_LOOKUP_GENERIC_FALLBACK,
-                                              NULL);
+                                              &error);
       /* We include this image as resource, so we always have it available or
        * the icontheme code is broken */
+      g_assert_no_error (error);
       g_assert (destination);
       symbolic = FALSE;
     }